import java.util.HashMap;

public class 十进制2二机制1的个数 {
    
    public static void main(String[] args) {
        

        System.out.println(hammingWeight(11));


    }

    public static int hammingWeight(int n) {
        
        int ans = 0;
        for (int i = 0; i < 32; i++) {
            ans += ((n >> i) & 1);
        }
        return ans;
    }
}
